home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 November / Macworld (1999-11).dmg / Shareware World / Info / For Developers / Smile1.6.6.sea / Smile1.6.6 / Smile ƒ / Help files / Routines < prev    next >
Text File  |  1999-07-19  |  2KB  |  40 lines

  1. Smile routines
  2.  
  3.  
  4. Smile is attachable. Every Smile object, each window, each dialog, the application itself, has a script (possibly empty). Many functionalities of Smile are handled by these scripts.
  5.  
  6. From Smile, or from another application - provided Smile is running - you can call the handlers contained in these scripts. We list below the most useful of them.
  7.  
  8.  
  9. Display commands
  10.  
  11. • FatalAlert(theString)
  12. Displays, in an alert box, the string stored in theString.
  13.  
  14. • AskUser(thePrompt,theDefaultReply)
  15. Asks the user to provide a string, and returns this string. The user is prompted by the string stored in thePrompt. The dialog box displays the string stored in theDefaultReply as the default reply. If the user cancels, the routine sends the error "User canceled".
  16.  
  17. • dd(theString)
  18. Displays, in an dialog box, the string stored in theString.
  19.  
  20. • msg(theString)
  21. Appends, at the end of the Worksheet, the string stored in theString, followed by a carriage return. If the Worksheet is not opened, it will first be opened in a new window.
  22.  
  23.  
  24. List utility
  25.  
  26. • sort(theList)
  27. Assuming that theList is a list of numbers, returns the list sorted by increasing values.
  28.  
  29. ========================================================
  30.  
  31. Advanced
  32.  
  33. • The class scripts contain some primitives which can prove useful to script Smile.
  34. OpenDictionary(thePathName) will open the dictionary of the application whose path is stored in thePathName.
  35. DoOpen(thePathName) will open the file whose path is stored in thePathName.
  36.  
  37. • To list the handlers, or the properties, contained in a script, see advanced script handling.
  38.  
  39. ========================================================
  40.